using UnityEngine;

public class AnnouncementPair
{
    public AnnouncementUI npcUI;
    public AnnouncementUI bgUI;

    public AnnouncementPair(AnnouncementUI npc, AnnouncementUI bg)
    {
        npcUI = npc;
        bgUI = bg;
    }

    public bool Contains(AnnouncementUI ui)
    {
        return npcUI == ui || bgUI == ui;
    }

    public bool IsReady()
    {
        return npcUI.IsLoaded && bgUI.IsLoaded;
    }

    public void DestroyBoth()
    {
        if (npcUI != null) GameObject.Destroy(npcUI.gameObject);
        if (bgUI != null) GameObject.Destroy(bgUI.gameObject);
    }
}
